
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/public.css" rel="stylesheet">
    <link href="css/index.css" rel="stylesheet">
    <title>主页</title>
</head>
<body>

<div class="nav top">
    <ul class="nav navbar-nav navbar-right top-list">
  
       
        <c:choose> 
        <c:when test="${empty sessionScope.session_user.username }">
         　　　　<li><a href="#">关于我们</a></li>
          　　　 <li><a href="regist.jsp" target="_parent">注册</a></li>
            <li><a href="login.jsp" target="_parent">登录</a></li>
        
        
       
       </c:when>
       <c:otherwise>
       <li>您好：${sessionScope.session_user.username }</a></li>
       </c:otherwise>
        </c:choose>
    </ul>
</div>

<div class="container main-container">
    <div class="nav-img">
        <img src="img/index-nav.png">
    </div>
    <div class="search">
        <form action="<c:url value='/SeedServlet'/>" method="post">
         <input type="hidden" name="method" value="query"/>
            <div class="form-group">
                <input type="search"  name="sname" class="form-control">
               <button class="btn-default search-btn" ></button>
            </div>
        </form>
    </div>

    <nav class="nav nav-main">

        <ul class="nav navbar-nav nav-list">
            <li><a href="index">首页</a></li>
             <li><a href="<c:url value='/AdminSeedServlet?method=addPre1'/>">上传产品</a></li>
           <li><a href="<c:url value='/SeedServlet?method=findAll'/>">产品列页</a></li>
            <li><a href="<c:url value='/CategoryServlet?method=findAll'/>">所有分类</a></li>
            <li><a href="<c:url value='/SeedServlet?method=messageGet'/>">留言板</a></li>
        </ul>
    </nav>

    <!--以上在后台设计的时候放到一个页面中，让别的页面去引用它-->
    <div class="row">
        <div class="col-md-9" style="padding: 0;">
            <div class="col-md-6">
                <div class="panel panel-green">
                    <div class="panel-heading">
                        <div class="panel-title">
                            <span class="glyphicon glyphicon-star">&nbsp;</span>最新动态
                        </div>
                    </div>
                    <div class="panel-body">
						<table class="new-table">
							<tr>
								<td class="new-table-img"><img src="img/yumi6.jpg"></td>
								<td class="new-table-content">
									<div class="describe">
										<h5 class="describe-title"><a href="tezheng1.jsp">Borg(博格) 抗TY病毒新品种</a></h5>
										<p>特征特性：荷兰引进，中旱熟杂交</p>
										<p>特征特性：荷兰引进，中旱熟杂交</p>
									</div>
								</td>
							</tr>
						</table>
						<ul class="new-list">
							<li><a href="xinwen6.jsp">1、广东省发布《2017年农药使用量...</a><span class="new-time">[2016-03-10]</span></li>
							<li><a href="xinwen1.jsp">2、国务院印发《关于建立粮食生产...</a><span class="new-time">[2016-03-10]</span></li>
							<li><a href="xinwen2.jsp">3、农业部实施《种子法》全面推...</a><span class="new-time">[2016-03-10]</span></li>
							<li><a href="xinwen3.jsp">4、化肥淡储管理新办法发布</a><span class="new-time">[2016-03-10]</span></li>
							<li><a href="xinwen4.jsp">5、新《农药管理条例》有助于...</a><span class="new-time">[2016-03-10]</span></li>
							<li><a href="xinwen5.jsp">6、海南：保鲜冰瓶以蔬菜价售出违法</a><span class="new-time">[2016-03-10]</span></li>
						</ul>
                   
                    
                    </div>
                </div>
            </div>

            <div class="col-md-6">
                <div class="panel panel-green index-carousel">
                    <div class="panel-heading">
                        <div class="panel-title">
                            <span class="glyphicon glyphicon-signal">&nbsp;</span>蔬菜种植
                            <a href="#" style="float: right">更多</a>
                        </div>
                    </div>
                    <div class="panel-body plant">
                        <div class="plant-left col-md-4">
                            <img src="img/dou.jpg">
                            <ul>
                                <li><a href="seedPlant.jsp">栽培技术</a></li>
                                <li><a href="seedPlant.jsp">病虫防治</a></li>
                                <li><a href="seedPlant.jsp">食用方法</a></li>
                                <li><a href="seedPlant.jsp">营养价值</a></li>
                            </ul>
                        </div>
                        <div class="plant-right col-md-8">
                            
                                <ul>
                                <li><span class="glyphicon glyphicon-chevron-right"></span><a href="tezheng1.jsp">番茄的种植技术和收获技术</a></li>
                                <li><span class="glyphicon glyphicon-chevron-right"></span><a href="tezheng2.jsp">Borg抗TY病毒番茄种植技术</a></li>
                                <li><span class="glyphicon glyphicon-chevron-right"></span><a href="tezheng3.jsp">浅谈对蔬菜种子进行科学消毒</a></li>
                                <li><span class="glyphicon glyphicon-chevron-right"></span><a href="4.jsp">如何鉴别蔬菜种子的新与陈</a></li>
                                <li><span class="glyphicon glyphicon-chevron-right"></span><a href="5.jsp">水果玉米甜玉米栽培与利用技术</a></li>
                                <li><span class="glyphicon glyphicon-chevron-right"></span><a href="6.jsp">小麦冬季要四防</a></li>
                                <li><span class="glyphicon glyphicon-chevron-right"></span><a href="7.jsp">春大豆栽培技术最重要</a></li>
                            </ul>
                               
                            
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-12">
                <div class="panel panel-green">
                    <div class="panel-heading">
                        <div class="panel-title">
                            <span class="glyphicon glyphicon-shopping-cart">&nbsp;</span>精品推荐
                            <a href="<c:url value='/CategoryServlet?method=findAll'/>" style="float: right">更多</a>
                        </div>
                    </div>

                    <div class="panel-body">
                        <a href="<c:url value='/SeedServlet?method=load&sid=${10}'/>" class="product">
                        	<img src="seed_img/fanqie2.jpg">
                        	<p class="main-seed-p">金冠59号番茄</p>
                        </a>
                        
                        <a href="<c:url value='/SeedServlet?method=load&sid=${28}'/>" class="product">
                        	<img src="seed_img/qingcai1.jpg">
                        	<p class="main-seed-p">四九菜心种子</p>
                        </a>
                        <a href="<c:url value='/SeedServlet?method=load&sid=${33}'/>" class="product">
                            <img src="seed_img/shucai5.jpg">
                            <p class="main-seed-p">早熟5号</p>
                        </a>
                        <a href="<c:url value='/SeedServlet?method=load&sid=${32}'/>" class="product">
                            <img src="seed_img/shucai2.jpg">
                            <p class="main-seed-p">特矮青菜</p>
                        </a>
                        <a href="<c:url value='/SeedServlet?method=load&sid=${14}'/>" class="product">
                            <img src="seed_img/lajiao.jpg">
                            <p class="main-seed-p">京椒12</p>
                        </a>
                        <a href="<c:url value='/SeedServlet?method=load&sid=${15}'/>" class="product">
                            <img src="seed_img/huahui.jpg">
                            <p class="main-seed-p"> 金盏菊 悠远</p>
                        </a>
                        <a href="<c:url value='/SeedServlet?method=load&sid=${16}'/>" class="product">
                            <img src="seed_img/huahui2.jpg">
                            <p class="main-seed-p">玫瑰花 热曲</p>
                        </a>
                        <a href="<c:url value='/SeedServlet?method=load&sid=${30}'/>" class="product">
                            <img src="seed_img/xiaomai2.jpg">
                            <p class="main-seed-p">中麦12</p>
                        </a>
                        <a href="<c:url value='/SeedServlet?method=load&sid=${27}'/>" class="product">
                            <img src="seed_img/yumi2.jpg">
                            <p class="main-seed-p">盛糯一号</p>
                        </a>
                       
                     <a href="<c:url value='/SeedServlet?method=load&sid=${26}'/>" class="product">
                            <img src="seed_img/yumi1.jpg">
                            <p class="main-seed-p">黄金甜玉米-超甜</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${26}'/>" class="product">
                            <img src="seed_img/xiaomai.jpg">
                            <p class="main-seed-p">中麦9号</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${34}'/>" class="product">
                            <img src="seed_img/dadou.jpg">
                            <p class="main-seed-p">超级毛豆王 -- 高产毛豆种子</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${26}'/>" class="product">
                            <img src="seed_img/yumi6.jpg">
                            <p class="main-seed-p">绿色超人-可生食水果玉米</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${40}'/>" class="product">
                            <img src="seed_img/dadou2.jpg">
                            <p class="main-seed-p">中黄13号大豆</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${41}'/>" class="product">
                            <img src="seed_img/dadou1.jpg">
                            <p class="main-seed-p">中黄35号黄豆</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${39}'/>" class="product">
                            <img src="seed_img/xiaomai4.jpg">
                            <p class="main-seed-p">高稳一号小麦</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${42}'/>" class="product">
                            <img src="seed_img/xiaomai3.jpg">
                            <p class="main-seed-p">轮选518小麦种子</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${36}'/>" class="product">
                            <img src="seed_img/yumi3.jpg">
                            <p class="main-seed-p">甜脆密8号-超甜可生食水果玉米</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${37}'/>" class="product">
                            <img src="seed_img/yumi5.jpg">
                            <p class="main-seed-p">甜脆密9号-超甜可生食水果玉米</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${38}'/>" class="product">
                            <img src="seed_img/yumi4.jpg">
                            <p class="main-seed-p">甜脆密10号-超甜可生食水果玉米</p>
                        </a>
                         <a href="<c:url value='/SeedServlet?method=load&sid=${26}'/>" class="product">
                            <img src="seed_img/lajiao3.jpg">
                            <p class="main-seed-p">双特奇剑红椒</p>
                        </a>
                    </div>

                </div>
            </div>
        </div>




        <div class="col-md-3">
            <div class="panel panel-green">
                <div class="panel-heading">
                    <div class="panel-title">
                        <span class="glyphicon glyphicon-tag">&nbsp;</span>小提示
                        <a href="#" style="float: right">更多</a>
                    </div>
                </div>
                <div class="panel-body bull">
                    <p>本站为农业种子筛选网站，旨在为辛苦的农民朋友，爱好农业的朋友，提供专业的种子筛选，不让农民朋友一年的辛苦白费，提高农民的幸福指数</p>
                </div>
            </div>
            <div class="panel panel-green">
                <div class="panel-heading">
                    <div class="panel-title">
                        <span class="glyphicon glyphicon-th-list">&nbsp;</span>公告栏
                        <a href="#" style="float: right">更多</a>
                    </div>
                </div>
                <div class="panel-body bull">
                    <p>数据相对较少，忘有经验的人士，农民兄弟，农业学者，农业爱好者，可以上传你认为好的产品，大家一起分享，一起交流，一起促进我们农民朋友的收入。</p>
                </div>
            </div>
            
           
            <!-- 个性推荐 -->
             <c:choose> 
             
              <c:when test="${empty sessionScope.session_user.username }">
            　　　　　　　 <div class="panel panel-green">
                <div class="panel-heading">
                    <div class="panel-title">
                        <span class="glyphicon glyphicon-comment">&nbsp;</span>留言板
                        <a href="#" style="float: right">更多</a>
                    </div>
                </div>
                <div class="panel-body message">
                    <form action="<c:url value='/SeedServlet'/>" method="post">
                     <input type="hidden" name="method" value="messageAdd"/>
                        <textarea name="content" placeholder="请输入留言"></textarea>
                        <button class="btn btn-warning">提交</button>
                    </form>
                </div>
            </div>
            </c:when>
             <c:otherwise>  
             　　　　　　  <div class="panel panel-green">
                <div class="panel-heading">
                    <div class="panel-title">
                        <span class="glyphicon glyphicon-comment">&nbsp;</span>个性推荐
                        <a href="#" style="float: right">更多</a>
                    </div>
                </div>
                <div class="panel-body p-recommend">
                    <table>
                    	<c:forEach items="${recommendSeed}" var="seed">
                    	<tr class="p-recommend-one">
                    		<td> <a href="<c:url value='/SeedServlet?method=load&sid=${seed.sid }'/>"><img src="upfile/${seed.image }"/></a></td>
                    		<td>
                    			<ul>
                    				<li>${seed.sname}</li>
                    				  <li>零售价格：${seed.price }元</li>
                    				   <li>包装规格：${seed.large }g/袋</li>
                    			</ul>
                    		</td>
                    	</tr>
                    	
                    	</c:forEach>
                 
                    </table>
                </div>
            </div>
          
            
      
             
              </c:otherwise>
             
              </c:choose>
           
           
         </div>
    </div>      
          
         
         
           
<!--以下单独放单独引用-->
    <div class="row">
        <div class="col-md-12">
            <div class="public-bottom">
                <div>
                    <p>郑州轻工业学院科学大道166号 计算机与通信工程学院 电子信息工程学院 大学生科技创业中心 </p>
                    <p style="text-align: center">联系电话：18790802327 &nbsp;&nbsp;&nbsp;版权所有：大学生科技创业中心</p>
                </div>
            </div>
        </div>
    </div>
</div>


</body>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</html>
